﻿using System;
using System.Linq;
using System.Linq.Expressions;
using NQueries.Data.Queries;
using TestModel;

namespace TestConsole
{
    [IdQuery(typeof(Product))]
    public class QueryProductById : Query<IAdventureWorksEntities, int, Product>
    {
        protected override Expression<Func<IAdventureWorksEntities, int, Product>> Expression { get { return (context, id) => context.Products.Single(x => x.ProductID == id); } }
    }
}